Sub ConnectOLS1()
Dim cnn1 As New Connection
Dim rst1 As Recordset

'Create the Connection
cnn1.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
    "Data Source=C:\LunarSociety\OLS1.mdb;"
   
'Create a recordset reference, then set its properties
Set rst1 = New ADODB.Recordset
rst1.CursorType = adOpenKeyset
rst1.LockType = adLockOptimistic

'Open the recordset, and print several fields from a test record
rst1.Open "MEMBERS", cnn1
Debug.Print rst1.Fields(0).Value, rst1.Fields(1).Value, _
    rst1.Fields(2).Value, rst1.Fields(5).Value

'Clean up before exiting
rst1.Close
cnn1.Close
Set rst1 = Nothing
Set cnn1 = Nothing

End Sub
